Skip to content

fix(output): preserve tail lines to prevent CI summary loss (#1035)#1221

Open
ousamabenyounes wants to merge 1 commit intortk-ai:developfrom
ousamabenyounes:fix/issue-1035
Open

fix(output): preserve tail lines to prevent CI summary loss (#1035)#1221
ousamabenyounes wants to merge 1 commit intortk-ai:developfrom
ousamabenyounes:fix/issue-1035

Conversation

@ousamabenyounes
Copy link
Copy Markdown
Contributor

Summary

Fixes #1035

  • make.toml had max_lines = 50 which kept only the first 50 lines of filtered output, discarding the tail where CI tools (pytest, vitest) always print their pass/fail summaries
  • truncate_output() in src/parser/mod.rs kept only the head chars in passthrough mode, causing the same summary loss when the vitest JSON parser falls through to Tier 3
  • Both now use head + last 20 lines with an omission marker so CI results are always visible regardless of how long the full output is

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • New test test_truncate_output_preserves_tail — 101-line CI output, verifies "251 passed, 18 skipped" survives truncation
  • New test test_truncate_output_tail_shows_last_20_lines — 50-line output, all 20 summary lines appear in tail
  • New TOML test "preserves tail for long composite output" — 51 filtered make lines, head=20 + omit(1) + tail=30
  • Existing tests all pass (1375 pass, 0 fail, 0 regressions)
  • Baseline was 1373; +2 from new tests

Files changed

File Change
src/filters/make.toml Replace max_lines = 50 with head_lines = 20, tail_lines = 30; add tail-preservation test case
src/parser/mod.rs Update truncate_output() to show head + tail with omission marker; add 2 new tests

Generated by Claude Code
Vibe coded by ousamabenyounes

@pszymkowiak pszymkowiak added bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal labels Apr 11, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes CI summary loss by updating both make.toml and truncate_output() in src/parser/mod.rs to preserve tail lines of output. Previously, only the first N lines/chars were kept, discarding the pass/fail summaries that CI tools print at the end. Now a head + tail strategy with an omission marker ensures summaries are always visible.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #1035


Analyzed automatically by wshm · This is an automated analysis, not a human review.

)

make.toml used max_lines=50 which truncated from the head, discarding
tail lines where pytest/vitest summaries always appear. truncate_output()
had the same problem for parser passthrough. Both now keep head + last 20
lines with an omission marker in between so CI results are always visible.

Generated by Claude Code
Vibe coded by ousamabenyounes

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants